package cn.zxh.improvement.common.core.exceptions;

/**
 * 应用异常
 *
 * @author zxh
 * @since 2023/4/26 15:31:19
 */
@SuppressWarnings("unused")
public class BaseException extends RuntimeException {
    private static final long serialVersionUID = 1L;

    /**
     * 创建应用异常
     *
     * @param t throw
     * @return AppException
     */
    public static BaseException of(Throwable t) {
        if (t instanceof BaseException) {
            return (BaseException) t;
        } else {
            return new BaseException(t);
        }
    }

    public BaseException() {
        super();
    }

    public BaseException(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace) {
        super(message, cause, enableSuppression, writableStackTrace);
    }

    public BaseException(String message, Throwable cause) {
        super(message, cause);
    }

    public BaseException(String message) {
        super(message);
    }

    public BaseException(Throwable cause) {
        super(cause);
    }

}
